package com.atguigu.responsibilitychain.demo;

/**
 * 校长
 * 
 * <pre>
 * 如果金额 超过30000以上，有审批
 * </pre>
 */
public class ApproverForSchoolMaster extends Approver {

	public ApproverForSchoolMaster(String name) {
		super(name);
	}

	@Override
	public void processRequest(PurchaseRequest purchaseRequest) {
		if (purchaseRequest.getPrice() > 30000) {
			System.out.println(" 请求编号 id= " + purchaseRequest.getId() + " 被 " + this.name + " 处理");
		} else {
			nextApprover.processRequest(purchaseRequest);
		}
	}
}
